const service = require('../service/user.service');   

class UserController {
  async create(ctx, next) {
      //获取用户请求传递的参数
    const user = ctx.request.body;  
      //查询数据
    const result = await service.create(user);   //调用create方法
      
    //返回数据
    ctx.body = result;     //将返回值返回
  }
}

module.exports = new UserController();